package com.css.fxfzypg.modules.baseData.repository;

import com.alibaba.fastjson.JSONObject;
import com.css.fxfzypg.modules.baseData.dto.GdpDTO;
import com.css.fxfzypg.modules.baseData.queryParams.GdpQueryParams;
import com.css.fxfzypg.modules.baseData.entity.GdpEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.repository.query.Param;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

/**
 * @author y1fan
 * @create 2022-08-11 16:54
 */
public interface GdpRepositpory {


    int saveGdp(GdpEntity gdpEntity);

    GdpEntity getGdpById(String id);

    GdpEntity getGdpByDivision(String province,String city,String prefecture);

    int updateGdp(GdpEntity gdpEntity);

    JSONObject getAllPeoByParams(GdpQueryParams queryParams, int curPage, int pageSize);

    void deleteGdpByIds(@Param(value = "id") String id, @Param(value = "userId") String userId, @Param(value =
            "currentTimestamp") Timestamp currentTimestamp);

    int[] importExcel(List<GdpEntity> gdpEntities);

    List<GdpEntity> exportExcel();

    Integer countByCounty(String province, String city, String county);
    Integer countByCity(String province, String city);
    Integer countByProvince(String province);

    Integer countByProvinceAndYear(String provinceName, String taskYear);
}
